You are here: Record management > Specializing a rule >  Circumstance rule examples

 Circumstance rule examples

This topic provides working examples of how circumstances can be implemented in your application. For general guidance on circumstance rules and how they are created, refer to:

Overview

Assume that you have different pricing levels for your customers. You first define a base pricing rule for all customers. Then you qualify the base rule by creating circumstanced rules for customers at different buying levels. The property .CustomerType is part of the customer order and has values of "Silver" and "Gold". In this example, a customer has purchased a $100 item. Using the property and values, you create circumstance-qualified instances of the base rules as shown here:

When the system processes the order, the value of that property dictates which rule is run and thereby determines the discount (if any) the customer receives.

Using property rules in a circumstance

The example above used the single value property.CustomerType to qualify the base pricing rule. Specifying a property value in a circumstance is only supported by certain rule types; refer to the Allow Selection based on Property Rules? check box selected on the Class form defining the rule type.

You can also specify a date property along with the time period against which the value of the date property is evaluated.

For example, an annuity is an investment vehicle providing scheduled payments for many years (or in some cases for the life of the investor). A work item supporting annuity processing needs that an expiration date (say ExpireDate), occurs between December 15, 2015 and December 31, 2015. If a few processing aspects of the work item depend on this value, they can be derived from a base rule by specifying a Date property of .ExpireDate and the start date and end date as 12/31/2015 and 12/31/2015.

A single rule may contain both a circumstance property and a date circumstance property. For the circumstance property value, an exact match is required. For the date circumstance, when a date property is specified its value must occur after the specified start date and before the end date. If a date property is not specified, the system time at the time of processing should occur after the specified start date and before the end date.

NOTE: If two base rules with the same Apply to key part and family name both have one or more associated property circumstance-qualified rules, the same circumstance property must be used. For example, if activity MyClass.Alpha has an associated circumstance-qualified rule using property .State, then another activity MyClass.Alpha cannot have a circumstance rule with any property other than .State.

Using a date in a circumstance

A date circumstance defines a period of time where a version is eligible for selection during rule resolution.

For example, assume that the normal service-level agreement for a retail operation allows four days as the goal time. Management may decide — to accommodate an extraordinary volume crunch in December or January — to create a temporary rule with six days as the goal time. The Start Date of the time-qualified rule can be set to December 1 of a year, and the End Date to January 31. No other changes to the application are necessary; assignments created anytime during those two months have the longer intervals.

Using multiple properties in a circumstance

Multivariate circumstancing enables you to specialize a rule by more than one feature. For example, an insurance company may be required to collect, for every state, claims that exceed a specific amount and the method by which the claims were conveyed (letter, phone, email, and so on). Another example may be the need for a rule that is specialized by an age range and not an absolute value.

If you use multivariate circumstancing, you select the following records:

Finding circumstance rules in your application

Select Designer Studio> Process and Rules > Tools > Find Rules > Find by Circumstance to create a report comprising single-property and multiple-property circumstanced rules. You can filter the report by searching on the following default circumstance properties: U.S. State Codes, Channels, and Customer Level. You can also search for circumstance-qualified rules by entering text used in key parts (Apply to or Identifier) in the Name Contains field.

For more information on how to report on circumstanced rules, or how to add or change the circumstance property columns for the report, see the PDN article How to find rules with a specific circumstance .

Use the Data-Circumstance-Duplicates.CircumstanceMultiples.ALL report to identify single circumstance-qualified rules that incorrectly use two or more different properties. Such conflicts can arise when rules are imported into a RuleSet that already contains some circumstanced rules. To access this report, select Designer Studio> Application > Inventory > Inventory Reports. Enter Rule as the Category and circumstance as the search text.

Notes

 

Related Topics Link IconRelated information